<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
			<link rel="stylesheet" href="http://127.0.0.1/teacherShop/template/default/css/goods_list.css">	
         <script type='text/javascript' src='http://127.0.0.1/teacherShop/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://127.0.0.1/teacherShop/hdphp/hdphp/../hdjs/css/hdjs.css' rel='stylesheet' media='screen'>
<script src='http://127.0.0.1/teacherShop/hdphp/hdphp/../hdjs/js/hdjs.js'></script>
<script src='http://127.0.0.1/teacherShop/hdphp/hdphp/../hdjs/js/slide.js'></script>
<script src='http://127.0.0.1/teacherShop/hdphp/hdphp/../hdjs/org/cal/lhgcalendar.min.js'></script>
<script type='text/javascript'>
		HOST = 'http://127.0.0.1';
		ROOT = 'http://127.0.0.1/teacherShop';
		WEB = 'http://127.0.0.1/teacherShop/index.php';
		URL = 'http://127.0.0.1/teacherShop/index.php/Index/Index/category/cid/5/s/0-0-0-0';
		HDPHP = 'http://127.0.0.1/teacherShop/hdphp/hdphp';
		HDPHPDATA = 'http://127.0.0.1/teacherShop/hdphp/hdphp/Data';
		HDPHPTPL = 'http://127.0.0.1/teacherShop/hdphp/hdphp/Lib/Tpl';
		HDPHPEXTEND = 'http://127.0.0.1/teacherShop/hdphp/hdphp/Extend';
		APP = 'http://127.0.0.1/teacherShop/index.php/Index';
		CONTROL = 'http://127.0.0.1/teacherShop/index.php/Index/Index';
		METH = 'http://127.0.0.1/teacherShop/index.php/Index/Index/category';
		GROUP = 'http://127.0.0.1/teacherShop/my';
		TPL = 'http://127.0.0.1/teacherShop/template/default';
		CONTROLTPL = 'http://127.0.0.1/teacherShop/template/default/Index';
		STATIC = 'http://127.0.0.1/teacherShop/Static';
		PUBLIC = 'http://127.0.0.1/teacherShop/template/default/Public';
		HISTORY = 'http://127.0.0.1/teacherShop/';
		HTTPREFERER = 'http://127.0.0.1/teacherShop/';
</script>
         <script type="text/javascript" src="http://127.0.0.1/teacherShop/template/default/js/index.js"></script>	
         <script type="text/javascript">
         	$(function(){
         		$('.goods').hover(function() {
         			$(this).find('.gborder').show();
         		}, function() {
         			$(this).find('.gborder').hide();
         		});
         	})
         </script>	
    </head>
    <body style="margin-bottom:20px;">
    	   <?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><div id="top_box">
	    	<div id="top">
	    		<div class="top_left">
	    			<ul>
	    				<li>欢迎光临E手店</li>
	    				<!-- <li><a href="">小米网</a></li>
	    				<li><a href="">MIUI</a></li>
	    				<li><a href="">米聊</a></li>
	    				<li><a href="">游戏</a></li>
	    				<li><a href="">多看阅读</a></li>
	    				<li><a href="">云服务</a></li>
	    				<li><a href="">小米网移动版</a></li> -->
	    			</ul>
	    			
	    		</div>
	    		<ul class="top_right">
	    			<li><a href="<?php echo U('Index/Register/index');?>">注册</a></li>
	    			<li><a href="<?php echo U('Index/Login/index');?>">登陆</a></li>
	    		</ul>
	    		<ul class="logined">
	    			<li >
	    				<a href="">我的E手店账户</a>
	    				
	    			</li>
	    			<li><a href="<?php echo U('Index/Order/showOrder');?>">我的订单</a></li>
	    			<li id = "myCount">
	    				欢迎您 <span><?php echo $_SESSION['user']['uname'];?></span>
	    				<div>
	    					<a href="<?php echo U('Index/Login/out');?>">退出登陆</a>
	    				</div>
	    			</li>
	    		</ul>
	    	</div>
	    </div>

	   <!-- logo区域开始 -->
	   <div id="logo" class="auto h110 w1240" >
	   	<div class="logo_left">
		   	<a href="http://127.0.0.1/teacherShop"><img src="http://127.0.0.1/teacherShop/template/default/image/logo.jpg" alt="" class="w70 h70 mT24 fL"></a>
	   		<a href="http://127.0.0.1/teacherShop" class="show mT30 fL mL10">超便捷的购物体验<br/>
	   			
	   			<span><i>E</i>手店</span>
	   		</a>
	   	</div>

	   	<div class="logo_right">
	   		<p class="c8c F12">下轮开放购买：5月13日星期三</p>
	   		<dl class="shoppingCar">
	   			<dt>购物车 (<?php echo $_SESSION['shoppingCar']['totalNum'];?>)</dt>
	   			
	   			<dd class="carHidden">
	   				<?php foreach ($_SESSION['shoppingCar']['goods'] as $key => $good):?>
	   				<div class="goodlist">
	   					<img src="http://127.0.0.1/teacherShop/<?php echo $good['index_pic'];?>" alt="">
	   					<p class="gname"><a href=""><?php echo $good['gname'];?></a></p>
	   					<p class="price"><?php echo $good['price'];?> x <?php echo $good['num'];?></p>
	   					<span onclick="delCarGoods(this)" stid="<?php echo $key;?>">x</span>
	   				</div>
	   				<?php endforeach?>

	   				<div class="goToPay">
	   					<div class="left">
	   						<div>共计 <span><?php echo $_SESSION['shoppingCar']['totalNum'];?></span> 件商品</div>
	   						<i>总计：</i><span><?php echo $_SESSION['shoppingCar']['totalMoney'];?></span>
	   					</div>
	   					<a href="<?php echo U('Index/ShoppingCar/index');?>" class="btn">去购物车结算</a>
	   				</div>

	   			</dd>
	   		</dl>
	   		<form action="<?php echo U('Index/Index/search');?>" method="post">
	   		<input type="text" class="search_box" name="keyword" placeholder="搜索您需要的商品">
	   		<input type="submit" value="搜索" class="search_btn" >
				</form>
	   	</div>

	   </div>

	   <!-- logo区域结束 -->

	   <!-- 导航区域开始 -->
	   <div id="menu_box">
	   	
	   	<ul class="menu_left">
		   	<div class="m_title">
	   	   	全部商品
	   	   </div> 
	   
		   	<?php $hd["list"]["c1"]["total"]=0;if(isset($categoryData) && !empty($categoryData)):$_id_c1=0;$_index_c1=0;$lastc1=min(1000,count($categoryData));
$hd["list"]["c1"]["first"]=true;
$hd["list"]["c1"]["last"]=false;
$_total_c1=ceil($lastc1/1);$hd["list"]["c1"]["total"]=$_total_c1;
$_data_c1 = array_slice($categoryData,0,$lastc1);
if(count($_data_c1)==0):echo "";
else:
foreach($_data_c1 as $key=>$c1):
if(($_id_c1)%1==0):$_id_c1++;else:$_id_c1++;continue;endif;
$hd["list"]["c1"]["index"]=++$_index_c1;
if($_index_c1>=$_total_c1):$hd["list"]["c1"]["last"]=true;endif;?>

		   		<li class="menu_left_mainChannel">
		   			<a href="<?php echo getCategoryUrl($c1['cid']);?>" class="leftHover">
		   			<span class="m_cat"><?php echo $c1['cname'];?></span>
		   			<span class="m_pro">
		   				<?php echo $c1['keywords'];?>
		   			</span></a>
		   			<ul class="menu_hidden">
		   				<?php $hd["list"]["c2"]["total"]=0;if(isset($c1['_data']) && !empty($c1['_data'])):$_id_c2=0;$_index_c2=0;$lastc2=min(1000,count($c1['_data']));
$hd["list"]["c2"]["first"]=true;
$hd["list"]["c2"]["last"]=false;
$_total_c2=ceil($lastc2/1);$hd["list"]["c2"]["total"]=$_total_c2;
$_data_c2 = array_slice($c1['_data'],0,$lastc2);
if(count($_data_c2)==0):echo "";
else:
foreach($_data_c2 as $key=>$c2):
if(($_id_c2)%1==0):$_id_c2++;else:$_id_c2++;continue;endif;
$hd["list"]["c2"]["index"]=++$_index_c2;
if($_index_c2>=$_total_c2):$hd["list"]["c2"]["last"]=true;endif;?>

			   				<li class="hidden_list">
			   					<dl>
			   						<a href="<?php echo getCategoryUrl($c2['cid']);?>" class="leftHover"><dt><?php echo $c2['cname'];?></dt></a>
			   						<?php $hd["list"]["c3"]["total"]=0;if(isset($c2['_data']) && !empty($c2['_data'])):$_id_c3=0;$_index_c3=0;$lastc3=min(1000,count($c2['_data']));
$hd["list"]["c3"]["first"]=true;
$hd["list"]["c3"]["last"]=false;
$_total_c3=ceil($lastc3/1);$hd["list"]["c3"]["total"]=$_total_c3;
$_data_c3 = array_slice($c2['_data'],0,$lastc3);
if(count($_data_c3)==0):echo "";
else:
foreach($_data_c3 as $key=>$c3):
if(($_id_c3)%1==0):$_id_c3++;else:$_id_c3++;continue;endif;
$hd["list"]["c3"]["index"]=++$_index_c3;
if($_index_c3>=$_total_c3):$hd["list"]["c3"]["last"]=true;endif;?>

			   							<dd><a href="<?php echo getCategoryUrl($c3['cid']);?>"><?php echo $c3['cname'];?></a></dd>
			   						<?php $hd["list"]["c1"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>

			   					</dl>
			   				</li>
		   				<?php $hd["list"]["c2"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
		   			</ul>
		   		</li>
		   	<?php $hd["list"]["c3"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>

	   	</ul>
	   	<ul class="menu_right">
	   		<li><a href="http://127.0.0.1/teacherShop">首页</a></li>
	   		<li><a href="">小米手机</a></li>
	   		<li><a href="">红米</a></li>
	   		<li><a href="">小米电视</a></li>
	   		<li><a href="">盒子</a></li>
	   		<li><a href="">路由器</a></li>
	   		<li><a href="">合约机</a></li>
	   		<li><a href="">服务</a></li>
	   		<li><a href="">社区</a></li>
	   	</ul>
	   </div>
	   <!-- 导航区域结束 -->
	   
	   
	   <!-- 属性规格区开始 -->
	   <div class="w1240 h35 auto lh36 F18">
	   	<!-- 我的位置开始 -->
	   <ul id="myposition">
	   	<li><a href="http://127.0.0.1/teacherShop">首页</a></li>
	   	<?php $hd["list"]["c"]["total"]=0;if(isset($ca) && !empty($ca)):$_id_c=0;$_index_c=0;$lastc=min(1000,count($ca));
$hd["list"]["c"]["first"]=true;
$hd["list"]["c"]["last"]=false;
$_total_c=ceil($lastc/1);$hd["list"]["c"]["total"]=$_total_c;
$_data_c = array_slice($ca,0,$lastc);
if(count($_data_c)==0):echo "";
else:
foreach($_data_c as $key=>$c):
if(($_id_c)%1==0):$_id_c++;else:$_id_c++;continue;endif;
$hd["list"]["c"]["index"]=++$_index_c;
if($_index_c>=$_total_c):$hd["list"]["c"]["last"]=true;endif;?>

	   		<li><a href="<?php echo U('Index/Category',array('cid'=>$c['cid']));?>"><?php echo $c['cname'];?></a></li>
	   	<?php $hd["list"]["c"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
	   	
	   </ul>
	   <!-- 我的位置结束 -->	
	   </div>

	   <?php $hd["list"]["attr"]["total"]=0;if(isset($attrData) && !empty($attrData)):$_id_attr=0;$_index_attr=0;$lastattr=min(1000,count($attrData));
$hd["list"]["attr"]["first"]=true;
$hd["list"]["attr"]["last"]=false;
$_total_attr=ceil($lastattr/1);$hd["list"]["attr"]["total"]=$_total_attr;
$_data_attr = array_slice($attrData,0,$lastattr);
if(count($_data_attr)==0):echo "";
else:
foreach($_data_attr as $key=>$attr):
if(($_id_attr)%1==0):$_id_attr++;else:$_id_attr++;continue;endif;
$hd["list"]["attr"]["index"]=++$_index_attr;
if($_index_attr>=$_total_attr):$hd["list"]["attr"]["last"]=true;endif;?>

		   <ul class="attr">
		   	<li><span><?php echo $attr['attr_name'];?> ：</span></li>
		   	<li><?php echo getSearchAttrValue(0,$hd['list']['attr']['index'],'全部');?></li>
		   	
		   	<?php $hd["list"]["value"]["total"]=0;if(isset($attr['attrValue']) && !empty($attr['attrValue'])):$_id_value=0;$_index_value=0;$lastvalue=min(1000,count($attr['attrValue']));
$hd["list"]["value"]["first"]=true;
$hd["list"]["value"]["last"]=false;
$_total_value=ceil($lastvalue/1);$hd["list"]["value"]["total"]=$_total_value;
$_data_value = array_slice($attr['attrValue'],0,$lastvalue);
if(count($_data_value)==0):echo "";
else:
foreach($_data_value as $key=>$value):
if(($_id_value)%1==0):$_id_value++;else:$_id_value++;continue;endif;
$hd["list"]["value"]["index"]=++$_index_value;
if($_index_value>=$_total_value):$hd["list"]["value"]["last"]=true;endif;?>

		   		<li>
		   			<!-- <a href=""><?php echo $value['attr_value'];?></a> -->
		   			<?php echo getSearchAttrValue($value['av_id'],$hd['list']['attr']['index'],$value['attr_value']);?>
		   		</li>
		   	<?php $hd["list"]["attr"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>

		   </ul>
		<?php $hd["list"]["value"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
	
	   <!-- 属性规格区结束 -->
	   <!-- 排序筛选区开始 -->
	    <ul class="sort">
	   	<li><a href="">推荐</a></li>
	   	<li><a href="">最新</a></li>
	   	<li>
	   		<a href="<?php echo U('category',array('s'=>$_GET['s'],'order'=>1,'cid'=>$_GET['cid']));?>">价格从高到底</a>
	   	</li>

	   	<li>
	   		<a href="<?php echo U('category',array('s'=>$_GET['s'],'order'=>0,'cid'=>$_GET['cid']));?>">价格从低到高</a>
	   	</li>
	   	<li><a href="">关注度</a></li>
	   </ul>
	   <!-- 排序筛选区结束 -->
	   <script>
	   	function addCart(obj){
	   		$(obj).parents('.gborder').find('.addCart').show().animate({
	   			height: 30,top:390},
	   			300, function() {
	   				setTimeout(function(){
		   					$(obj).parents('.gborder').find('.addCart').animate({
		   					height: 0,
		   					top: 420},
		   					300, function() {
		   					/* stuff to do after animation is complete */
	   					});
	   				},1000)
	   				
	   		});
				// $(obj).parents('.gborder').find('.addCart').show()
	   	}
	   </script>
	   <div id="content">
	   	<?php $hd["list"]["gd"]["total"]=0;if(isset($goodsData) && !empty($goodsData)):$_id_gd=0;$_index_gd=0;$lastgd=min(1000,count($goodsData));
$hd["list"]["gd"]["first"]=true;
$hd["list"]["gd"]["last"]=false;
$_total_gd=ceil($lastgd/1);$hd["list"]["gd"]["total"]=$_total_gd;
$_data_gd = array_slice($goodsData,0,$lastgd);
if(count($_data_gd)==0):echo "";
else:
foreach($_data_gd as $key=>$gd):
if(($_id_gd)%1==0):$_id_gd++;else:$_id_gd++;continue;endif;
$hd["list"]["gd"]["index"]=++$_index_gd;
if($_index_gd>=$_total_gd):$hd["list"]["gd"]["last"]=true;endif;?>


		   	<div class="goods">
		   		<div class="goodsBorder">
			   		<div class="gborder">
			   			<a href="javascript:;" class="shopcar" onclick="addCart(this)">+购物车</a>
			   			<a href="" class="gsave">收藏</a>
			   			<p class="addCart">已成功加入购物车</p>
			   		</div>
			   		
			   		<a href="<?php echo U('Index/index/content',array('gid'=>$gd['gid']));?>"><img src="http://127.0.0.1/teacherShop/<?php echo $gd['index_pic'];?>" alt="" class="gpic"></a>
			   		<p class="gtitle"><a href="<?php echo U('Index/index/content',array('gid'=>$gd['gid']));?>"><?php echo $gd['gname'];?></a></p>
			   		<p class="gprice"><?php echo $gd['price'];?></p>
		   		</div>
		   	</div>
	   	<?php $hd["list"]["gd"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
	   	
	   </div>
	   <div class="page w1240 auto txc h100">
	   	<?php echo $page;?>
	   </div>
	   	  	<!-- 尾部开始 -->
	  	<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><div id="foot_box">
	<div class="service">
		<ul>
			<li>
				<img src="http://127.0.0.1/teacherShop/template/default/image/foot_s1.gif" alt="">
				<p>1小时快修服务</p>
				<p class="small">小米之家承诺1小时完成快修</p>
			</li>

			<li>
				<img src="http://127.0.0.1/teacherShop/template/default/image/foot_s2.gif" alt="">
				<p>7天无理由退货</p>
				<p class="small">收到商品7天内无理由退货</p>
			</li>
			<li>
				<img src="http://127.0.0.1/teacherShop/template/default/image/foot_s3.gif" alt="">
				<p>15天免费换货</p>
				<p class="small">故障、硬件问题15天免费换新</p>
			</li>
			<li>
				<img src="http://127.0.0.1/teacherShop/template/default/image/foot_s4.gif" alt="">
				<p>1小时快修服务</p>
				<p class="small">小米之家承诺1小时完成快修</p>
			</li>
			<li>
				<img src="http://127.0.0.1/teacherShop/template/default/image/foot_s5.gif" alt="">
				<p>415家售后网点</p>
				<p class="small">遍布全国31省市维修网点</p>
			</li>
		</ul>
	</div>
	<div class="help">
		<ul>
			<li>
				<dl class="h1">
					<dt>帮助中心</dt>
					<dd>购物指南</dd>
					<dd>支付方式</dd>
					<dd>配送方式</dd>
				</dl>
			</li>
			<li>
				<dl class="h1">
					<dt>服务支持</dt>
					<dd>售后政策</dd>
					<dd>自助服务</dd>
					<dd>相关下载</dd>
				</dl>
			</li>
			<li>
				<dl class="h1">
					<dt>小米之家</dt>
					<dd>小米之家</dd>
					<dd>服务网点</dd>
					<dd>预约亲临到店服务</dd>
				</dl>
			</li>
			<li>
				<dl class="h1">
					<dt>关于小米</dt>
					<dd>了解小米</dd>
					<dd>加入小米</dd>
					<dd>联系我们</dd>
				</dl>
			</li>
			<li>
				<dl class="h1">
					<dt>关注我们</dt>
					<dd>新浪微博</dd>
					<dd>QQ空间</dd>
					<dd>官方微信</dd>
				</dl>
			</li>
		</ul>
		<div class="phone">
			<p class="num">400-100-5678</p>
			<p>周一至周日8:00-18:00</p>
			<p>(仅收市话费)</p>
		</div>
	</div>
	<div class="link">
		<div class="link_left">
			<p>小米旗下网站：</p>
			<ul>
				<li><a href="">小米网</a></li>
				<li><a href="">MIUI</a></li>
				<li><a href="">米聊</a></li>
				<li><a href="">多看书城</a></li>
				<li><a href="">小米路由器</a></li>
				<li><a href="">繁體香港</a></li>
				<li><a href="">繁體台灣</a></li>
				<li><a href="">English</a></li>
				<li><a href="">小米后院</a></li>
				<li><a href="">小米天猫店</a></li>
			</ul>
			<p>©mi.com 京ICP证110507号 京ICP备10046444号 京公网安备1101080212535号 京网文[2014]0059-0009号</p>
		</div>
		
	</div>
</div>
	  	<!-- 尾部结束 -->
    </body>
</html>